<template>
	<!-- 列表 -->
	<view class="common-list" v-for="item in commonData" :key="item.id">
		<view class="img"><image class="img" :src="item.image" :alt="item.image" /></view>
		<view class="img-list">
			<view class="img-title">{{ item.title }}</view>
			<view class="img-text">
				<text class="num">¥ {{ item.price }}</text>
				<text class="remarks">{{ item.sales }}人购买</text>
			</view>
		</view>
		<view class="buttons"><u-button @click="clickShopping(item)" size="mini" type="primary" text="购买"></u-button></view>
	</view>
</template>

<script>
export default {
	props: {
		list: {
			type: Array,
			default: () => []
		}
	},
	methods: {
		clickShopping(item) {
			this.$emit('clickShopping', item);
		}
	}
};
</script>

<style></style>
